package com.pro.service.imple;

import com.pro.common.GuavaCommon;
import com.pro.mapper.ProductMapper;
import com.pro.pojo.*;
import com.pro.service.ProductService;
import com.pro.utils.GuavaUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.concurrent.ExecutionException;

@Service
public class ProductServiceImple implements ProductService{

    @Autowired
    private ProductMapper pm;

    @Override
    public List<Integer> judgePower(Integer id) {
        return pm.judgePower(id);
    }

    @Override
    public List<ProductCategroy> getProductTree() {
        return pm.getProductTree();
    }

    @Override
    public boolean addProductCategroy(ProductCategroy productCategroy) {
        return pm.addProductCategroy(productCategroy);
    }

    @Override
    public boolean deleteProductCategroy(Integer categroyId) {
        return pm.deleteProductCategroy(categroyId);
    }

    @Override
    public boolean updateProductCategroy(String title, Integer categroyId) {
        return pm.updateProductCategroy(title, categroyId);
    }

    @Override
    public List<Product> getCheckedProduct(Integer categroyId) {
        return pm.getCheckedProduct(categroyId);
    }

    @Override
    public boolean updateProductState(Integer productSate,Integer productCode) {
        return pm.updateProductState(productSate,productCode);
    }

    @Override
    public boolean deleteByProductCodeProduct(Integer productCode) {
        return pm.deleteByProductCodeProduct(productCode);
    }

    @Override
    public List<Product> getProductSearch(String productName, String title,Integer productSate,String productLabel) {
        return pm.getProductSearch(productName, title, productSate, productLabel);
    }

    @Override
    public List<Product> getProductRetrieval(Product product) {
        return pm.getProductRetrieval(product);
    }

    @Override
    public boolean updateByProductCodeProduct(Product param) {
        return pm.updateByProductCodeProduct(param);
    }
    //查询所有商品数量
    @Override
    public Integer getProductCounts() {
        return pm.getProductCounts();
    }
    //模糊查询审核表 类型为商品的数据
    @Override
    public List<Product> getAuditTableAll(Product product) {
        return pm.getAuditTableAll(product);
    }

    @Override
    public List<Product> getRecordResultProducts(Product product) {
        return pm.getRecordResultProducts(product);
    }

    @Override
    public boolean addProduct(Product param) {
        return pm.addProduct(param);
    }

    @Override
    public boolean addCourseRecord(SyCourseRecord syCourseRecord) {
        return pm.addCourseRecord(syCourseRecord);
    }

    //个人商品
    @Override
    public List<Product> getPersonalProducts(Integer createId) {
        return pm.getPersonalProducts(createId);
    }

    //个人商品模糊查
    @Override
    public List<Product> getPersonalProductsSearch(String productName, String searchKeywords, String currentpriceProduct) {
        return pm.getPersonalProductsSearch(productName, searchKeywords, currentpriceProduct);
    }
    //获取所有商品货号
    @Override
    public List<Product> getProductCode() {
        return pm.getProductCode();
    }
    //根据商品编号获取商品id
    @Override
    public Product getproductId(Integer productCode) {
        return pm.getproductId(productCode);
    }

    @Override
    public boolean deleteProductRecord(String courseId) {
        return pm.deleteProductRecord(courseId);
    }

    @Override
    public Product getProductByOrderId(Integer orderId) {
        return pm.getProductByOrderId(orderId);
    }

    @Override
    public Product getProductBySalesVolume(Integer shopId) {
        return pm.getProductBySalesVolume(shopId);
    }

    @Override
    public Integer getUserCollection(Integer productCode) {
        return pm.getUserCollection(productCode);
    }

    @Override
    public Integer getUserOrder(Integer productCode) {
        return pm.getUserOrder(productCode);
    }

    @Override
    public List<Product> getProductsByNumNamePriceCatgory(Product product) {
        return pm.getProductsByNumNamePriceCatgory(product);
    }

    @Override
    public List<SyCourseRecord> getProductCourseRecord(SyCourseRecord syCourseRecord) {
        return pm.getProductCourseRecord(syCourseRecord);
    }

    @Override
    public int getAllProductUpperCount() {
        return pm.getAllProductUpperCount();
    }
}
